package com.hrm.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


import com.hrm.dao.RewardDao;
import com.hrm.pojo.Rewards;

@Service
@Transactional
public class RewardService {

	private RewardDao dao;
	
	@Transactional(readOnly=true)
	public List<Rewards> findAll() {
		return dao.findAll();
	}

	public void del(String id) {
		dao.delete(id);
	}
	
	
	public void save(Rewards rewards) {
		dao.save(rewards);
		
	}
	
	@Transactional(readOnly=true)
	public Rewards findById(String id) {
		return dao.findByUnique("id", id);
	}
	
	@Autowired
	public void setDao(RewardDao dao) {
		this.dao = dao;
	}

	





	
}
